package com.czp.mall.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.netflix.client.config.IClientConfig;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.RoundRobinRule;

@Configuration
public class RibbonConfig {
	
	/**
	 * 不要和启动类在同一包或者子包下
	 * @return
	 */
	 @Bean
	public IRule ribbonRule() { 
		return new RandomRule(); 
	} 
}
